package com.brillilab.starter.main;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.scheduling.annotation.EnableAsync;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;


@Slf4j
@SpringBootApplication
@ComponentScan(basePackages = { "com.brillilab"})
@MapperScan(basePackages = "com.brillilab.dao.mapper")
@EnableElasticsearchRepositories(basePackages="com.brillilab.elsearch.reponsitories")
@EnableAsync // 启动异步调用
@EnableAspectJAutoProxy
@EnableScheduling
public class StarterApp {
	
	public static void main(String[] args) {
		//解决rides和elasticsearch因Netty的初始化导致项目启动失败
		System.setProperty("es.set.netty.runtime.available.processors","false");
		SpringApplication.run(StarterApp.class, args);
		log.info(">>>>>>	StarterApp  SUCCESS");
	}
}